/**   
* @Title: DownloadQuartz.java 
* @Package com.kerrykidz.system.util.quartz 
* @Description: 
* Copyright: Copyright (c) 2014 
* Company:wuwh team by iss
* @author: zhuss   
* @date: 2014年10月9日 下午1:58:43 
* @version: V1.0
*
*/
package com.kerrykidz.system.util.quartz;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

import com.kerrykidz.system.util.sync.SyncParamHelper;
import com.kerrykidz.workflow.service.IWorkflowService;
import com.rdp.framework.exception.RDPException;
import com.rdp.util.config.SpringUtil;

/**
 * 
 * @ClassName: DownloadQuartz 
 * @description: 定时器：每十分钟下载一次总部的流程数据
 * @author: zhuss 
 * @date: 2014年10月8日 下午1:58:58 
 * @version: V1.0
 *
 */
public class DownloadQuartz extends QuartzJobBean{

	@Override
	protected void executeInternal(JobExecutionContext arg0)
			throws JobExecutionException {
				if(SyncParamHelper.CURRENT_STORE.indexOf("ZB") == -1){
					try {
						IWorkflowService workflowService = SpringUtil .getBeanByType(IWorkflowService.class);
						workflowService.executeDownload();
					} catch (RDPException e) {
						e.printStackTrace();
					}
				}
	}
}
